<template>
	<div class="course_manage_wrapper">
		<div class="course_manage_link">
			<router-link replace class="link" :to="`/admin/training/${courseId}/baseinfo`">基本信息</router-link>
			<router-link replace class="link" :to="`/admin/training/${courseId}/chapter`">搭建课程</router-link>
			<router-link replace class="link" :to="`/admin/training/${courseId}/attachment`">附件下载</router-link>
			<router-link replace class="link" :to="`/admin/training/${courseId}/student`">学员管理</router-link>
		</div>
		<router-view class="course_manage_body" :course-id="courseId"></router-view>
	</div>
</template>

<script>
export default {
	data() {
		return {};
	},
	computed: {
		courseId() {
			return this.$route.params.id;
		}
	}
};
</script>

<style lang="scss" scoped>
.course_manage_wrapper {
	display: flex;
	height: 100%;
	overflow: hidden;
}
.course_manage_link {
	width: 180px;
	flex-shrink: 0;
	border-right: solid 1px #ebeef5;
	a.link {
		display: flex;
		align-items: center;
		height: 40px;
		color: #606266;
		padding: 0 20px;
		text-decoration: none;
		border-bottom: solid 1px #ebeef5;
		&:hover {
			background-color: var(--primary-background-hover);
		}
		&.router-link-active {
			background-color: var(--primary-background-plain);
		}
	}
}
.course_manage_body {
	flex: 1;
	overflow: hidden;
}
</style>
